#include"Server.hpp"
#include<iostream>

int main()
{
    server s;
    std::cout << "server" << std::endl;
    s.openpipe();


    std::string num;
    while(true)
    {
        if(s.rpipe(&num) > 0)
        {
            std::cout <<"server读到的数据:" << num <<std::endl;
        }
        else//小于等于0
        {
            break;
        }
    }
    std::cout << "server已退出" << std::endl;
    
    s.closepipe();
    return 0;
}